package com.bobo.service.category;

import com.bobo.dao.category.CategoryDaoImpl;
import com.bobo.dao.category.ICategoryDao;
import com.bobo.dao.tag.ITagDao;
import com.bobo.dao.tag.TagDaoImpl;
import com.bobo.dto.Page;
import com.bobo.model.Category;
import com.bobo.model.Tag;

import java.util.List;

/**
 * Created by bobo on 2016/10/16.
 */
public class CategoryServiceImpl implements ICategoryService {

    ICategoryDao categoryDao = new CategoryDaoImpl();
    @Override
    public Integer create(Category category) {
        return categoryDao.create(category);
    }

    @Override
    public boolean delete(Integer id) {
        return categoryDao.delete(id);
    }

    @Override
    public boolean update(Category category) {
        return categoryDao.update(category);
    }

    @Override
    public Category getById(Integer id) {
        Category category = categoryDao.getById(id);
        return category;
    }

    @Override
    public List<Category> getCategories(Integer status) {
        return categoryDao.getCategories(0,0,status);
    }

}
